/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.appleframework.web;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author zhujg
 * 
 */
public class Params {

  private Map<String, String[]> params = new HashMap<String, String[]>();

  public void put(String key, String value) {
    params.put(key, new String[]{value});
  }

  public void put(String key, String values[]) {
    params.put(key, values);
  }

  public String get(String key) {
    if (params.containsKey(key)) {
      return params.get(key)[0];
    }
    return null;
  }

  public String[] getAll(String key) {
    if (params.containsKey(key)) {
      return params.get(key);
    }
    return null;
  }
}
